interface BaseProductionUnit {
    id: string;
    eosTransactionId: string; // eos记录id
    tag: string; // 产品ID (唯一标识符)
    name: string; // 产品名称
    description: string; // 产品描述
    traceabilityEvents?: TraceabilityEvent[]; // 溯源事件列表
}

interface TraceabilityEvent {
    id: string;
    eosTransactionId: string; // eos记录id
    type: '生产' | '包装' | '入库' | '物流' | '送达';
    time: string; // 生产时间
    location: string; // 地点
    operator: string; // 该事件的负责人
    details?: string; // 详细信息，备注
    inputMaterials?: BaseProductionUnit[]; // 仅当 eventType 为 "生产" 时使用，
}

// 面粉
const flour: BaseProductionUnit = {
    "id": "flour-batch-001",
    "eosTransactionId": "tx-flour-001",
    "tag": "FLOUR-001",
    "name": "有机小麦粉批次001",
    "description": "精细研磨的有机小麦粉。",
    "traceabilityEvents": [
        {
            "id": "event-flour-001-produced",
            "eosTransactionId": "tx-event-flour-001-produced",
            "type": "生产",
            "time": "2025-04-22T10:00:00+08:00",
            "location": "河北麦田农场",
            "operator": "李华",
            "details": "小麦已收割并磨成面粉。",
            "inputMaterials": []
        },
        {
            "id": "event-flour-001-packaged",
            "eosTransactionId": "tx-event-flour-001-packaged",
            "type": "包装",
            "time": "2025-04-22T10:30:00+08:00",
            "location": "北京包装车间A",
            "operator": "王芳",
            "details": "面粉已包装成1公斤袋装。",
            "inputMaterials": []
        },
        {
            "id": "event-flour-001-stored",
            "eosTransactionId": "tx-event-flour-001-stored",
            "type": "入库",
            "time": "2025-04-22T11:00:00+08:00",
            "location": "天津仓库A",
            "operator": "张三",
            "details": "面粉已存放在指定区域。",
            "inputMaterials": []
        },
        {
            "id": "event-flour-001-transported",
            "eosTransactionId": "tx-event-flour-001-transport",
            "type": "物流",
            "time": "2025-04-22T12:00:00+08:00",
            "location": "车牌号京A12345",
            "operator": "赵六",
            "details": "运输至面团准备站。",
            "inputMaterials": []
        },
        {
            "id": "event-flour-001-delivered",
            "eosTransactionId": "tx-event-flour-001-delivered",
            "type": "送达",
            "time": "2025-04-22T13:00:00+08:00",
            "location": "上海面团准备站",
            "operator": "周杰",
            "details": "面粉已送达并签收。",
            "inputMaterials": []
        }
    ]
}

// 面团(由面粉生产)
const dough: BaseProductionUnit = {
    "id": "dough-batch-001",
    "eosTransactionId": "tx-dough-001",
    "tag": "DOUGH-001",
    "name": "披萨面团批次001",
    "description": "新鲜制作的披萨面团。",
    "traceabilityEvents": [
        {
            "id": "event-dough-001-produced",
            "eosTransactionId": "tx-event-dough-001-produced",
            "type": "生产",
            "time": "2025-04-22T14:00:00+08:00",
            "location": "上海面团准备站",
            "operator": "李师傅",
            "details": "面团已混合并揉制。",
            "inputMaterials": [flour]
        },
        {
            "id": "event-dough-001-proofed",
            "eosTransactionId": "tx-event-dough-001-proofed",
            "type": "入库",
            "time": "2025-04-22T15:00:00+08:00",
            "location": "发酵室",
            "operator": "李师傅",
            "details": "面团已发酵并准备好使用。",
            "inputMaterials": []
        },
        {
            "id": "event-dough-001-transported-kitchen",
            "eosTransactionId": "tx-event-dough-001-transport-kitchen",
            "type": "物流",
            "time": "2025-04-22T16:00:00+08:00",
            "location": "厨房手推车#5",
            "operator": "厨师张",
            "details": "运输至披萨厨房A。",
            "inputMaterials": []
        },
        {
            "id": "event-dough-001-received-kitchen",
            "eosTransactionId": "tx-event-dough-001-received-kitchen",
            "type": "入库",
            "time": "2025-04-22T17:00:00+08:00",
            "location": "披萨厨房A",
            "operator": "大厨陈",
            "details": "面团已接收并准备好制作披萨。",
            "inputMaterials": []
        },
        {
            "id": "event-dough-001-used",
            "eosTransactionId": "tx-event-dough-001-used",
            "type": "生产",
            "time": "2025-04-22T18:00:00+08:00",
            "location": "披萨厨房A",
            "operator": "大厨陈",
            "details": "用于玛格丽特披萨 (pizza-001)。",
            "inputMaterials": []
        }
    ]
}

// 牛奶
const milk: BaseProductionUnit = {
    "id": "milk-batch-005",
    "eosTransactionId": "tx-milk-005",
    "tag": "MILK-005",
    "name": "鲜牛奶批次005",
    "description": "高品质新鲜牛奶",
    "traceabilityEvents": [
        {
            "id": "event-milk-005-produced",
            "eosTransactionId": "tx-event-milk-005-produced",
            "type": "生产",
            "time": "2025-04-22T12:00:00+08:00",
            "location": "山东奶牛牧场",
            "operator": "刘洋",
            "details": "从奶牛中收集牛奶。",
            "inputMaterials": []
        },
        {
            "id": "event-milk-005-processed",
            "eosTransactionId": "tx-event-milk-005-processed",
            "type": "包装",
            "time": "2025-04-22T12:30:00+08:00",
            "location": "济南加工工厂",
            "operator": "陈师傅",
            "details": "牛奶经过巴氏杀菌并包装。",
            "inputMaterials": []
        },
        {
            "id": "event-milk-005-stored",
            "eosTransactionId": "tx-event-milk-005-stored",
            "type": "入库",
            "time": "2025-04-22T13:00:00+08:00",
            "location": "青岛冷藏仓库",
            "operator": "孙经理",
            "details": "牛奶存储在控制温度下。",
            "inputMaterials": []
        },
        {
            "id": "event-milk-005-transported",
            "eosTransactionId": "tx-event-milk-005-transport",
            "type": "物流",
            "time": "2025-04-22T14:00:00+08:00",
            "location": "车牌号鲁B56789",
            "operator": "杨师傅",
            "details": "运输至芝士工厂。",
            "inputMaterials": []
        },
        {
            "id": "event-milk-005-delivered",
            "eosTransactionId": "tx-event-milk-005-delivered",
            "type": "送达",
            "time": "2025-04-22T15:00:00+08:00",
            "location": "广州芝士工厂",
            "operator": "黄先生",
            "details": "牛奶已送达并进行质量检查。",
            "inputMaterials": []
        }
    ]
}

// 芝士（由牛奶生产）
const cheese: BaseProductionUnit = {
    "id": "cheese-batch-004",
    "eosTransactionId": "tx-mozzarella-004",
    "tag": "MOZZARELLA-004",
    "name": "新鲜马苏里拉奶酪批次004",
    "description": "质地柔软的新鲜马苏里拉奶酪。",
    "traceabilityEvents": [
        {
            "id": "event-cheese-004-produced",
            "eosTransactionId": "tx-event-mozzarella-004-produced",
            "type": "生产",
            "time": "2025-04-21T16:00:00+08:00",
            "location": "广州芝士工厂",
            "operator": "王师傅",
            "details": "使用新鲜牛奶制作马苏里拉奶酪。",
            "inputMaterials": [milk]
        },
        {
            "id": "event-cheese-004-shaped",
            "eosTransactionId": "tx-event-mozzarella-004-shaped",
            "type": "包装",
            "time": "2025-04-21T17:00:00+08:00",
            "location": "广州芝士工厂",
            "operator": "李阿姨",
            "details": "马苏里拉奶酪制成球状并包装。",
            "inputMaterials": []
        },
        {
            "id": "event-cheese-004-stored",
            "eosTransactionId": "tx-event-mozzarella-004-stored",
            "type": "入库",
            "time": "2025-04-21T17:30:00+08:00",
            "location": "广州冷藏仓库",
            "operator": "陈经理",
            "details": "马苏里拉奶酪存储在最佳温度下。",
            "inputMaterials": []
        },
        {
            "id": "event-cheese-004-transported",
            "eosTransactionId": "tx-event-mozzarella-004-transport",
            "type": "物流",
            "time": "2025-04-21T18:30:00+08:00",
            "location": "车牌号粤C90123",
            "operator": "周师傅",
            "details": "运输至披萨厨房。",
            "inputMaterials": []
        },
        {
            "id": "event-cheese-004-delivered",
            "eosTransactionId": "tx-event-mozzarella-004-delivered",
            "type": "送达",
            "time": "2025-04-21T19:00:00+08:00",
            "location": "深圳披萨厨房",
            "operator": "吴先生",
            "details": "马苏里拉奶酪已送达并放入冷藏室。",
            "inputMaterials": []
        }
    ]
}

// 番茄
const tomato: BaseProductionUnit = {
    "id": "tomato-batch-003",
    "eosTransactionId": "tx-tomato-003",
    "tag": "TOMATO-003",
    "name": "成熟番茄批次003",
    "description": "新鲜采摘的成熟番茄。",
    "traceabilityEvents": [
        {
            "id": "event-tomato-003-produced",
            "eosTransactionId": "tx-event-tomato-003-harvested",
            "type": "生产",
            "time": "2025-04-22T11:00:00+08:00",
            "location": "云南番茄农场",
            "operator": "张大爷",
            "details": "番茄在最佳成熟期采摘。",
            "inputMaterials": []
        },
        {
            "id": "event-tomato-003-packaged",
            "eosTransactionId": "tx-event-tomato-003-packaged",
            "type": "包装",
            "time": "2025-04-22T12:00:00+08:00",
            "location": "昆明包装车间",
            "operator": "李大姐",
            "details": "番茄清洗后分装入箱。",
            "inputMaterials": []
        },
        {
            "id": "event-tomato-003-stored",
            "eosTransactionId": "tx-event-tomato-003-stored",
            "type": "入库",
            "time": "2025-04-22T13:00:00+08:00",
            "location": "昆明冷藏库",
            "operator": "王先生",
            "details": "番茄存储在最佳温度下。",
            "inputMaterials": []
        },
        {
            "id": "event-tomato-003-transported",
            "eosTransactionId": "tx-event-tomato-003-transport",
            "type": "物流",
            "time": "2025-04-22T14:00:00+08:00",
            "location": "车牌号云D56789",
            "operator": "刘师傅",
            "details": "运输至披萨厨房。",
            "inputMaterials": []
        },
        {
            "id": "event-tomato-003-delivered",
            "eosTransactionId": "tx-event-tomato-003-delivered",
            "type": "送达",
            "time": "2025-04-22T15:00:00+08:00",
            "location": "深圳披萨厨房",
            "operator": "陈先生",
            "details": "番茄已送达并放置在厨房。",
            "inputMaterials": []
        }
    ]
}

// 香肠
const pepperoni: BaseProductionUnit = {
    "id": "pepperoni-batch-006",
    "eosTransactionId": "tx-pepperoni-006",
    "tag": "PEPPERONI-006",
    "name": "辣味意式香肠批次006",
    "description": "薄切风干辣味意式香肠。",
    "traceabilityEvents": [
        {
            "id": "event-pepperoni-006-produced",
            "eosTransactionId": "tx-event-pepperoni-006-produced",
            "type": "生产",
            "time": "2025-04-22T13:00:00+08:00",
            "location": "四川肉类加工厂",
            "operator": "胡师傅",
            "details": "使用香料腌制并风干制作香肠。",
            "inputMaterials": []
        },
        {
            "id": "event-pepperoni-006-sliced",
            "eosTransactionId": "tx-event-pepperoni-006-sliced",
            "type": "包装",
            "time": "2025-04-22T14:00:00+08:00",
            "location": "成都包装车间",
            "operator": "王姐",
            "details": "香肠切片并真空包装。",
            "inputMaterials": []
        },
        {
            "id": "event-pepperoni-006-stored",
            "eosTransactionId": "tx-event-pepperoni-006-stored",
            "type": "入库",
            "time": "2025-04-22T15:00:00+08:00",
            "location": "成都冷藏仓库",
            "operator": "李先生",
            "details": "香肠存储在控制温度下。",
            "inputMaterials": []
        },
        {
            "id": "event-pepperoni-006-transported",
            "eosTransactionId": "tx-event-pepperoni-006-transport",
            "type": "物流",
            "time": "2025-04-22T16:00:00+08:00",
            "location": "车牌号川A23456",
            "operator": "陈师傅",
            "details": "运输至披萨厨房。",
            "inputMaterials": []
        },
        {
            "id": "event-pepperoni-006-delivered",
            "eosTransactionId": "tx-event-pepperoni-006-delivered",
            "type": "送达",
            "time": "2025-04-22T17:00:00+08:00",
            "location": "深圳披萨厨房",
            "operator": "张先生",
            "details": "香肠已送达并放入冷藏室。",
            "inputMaterials": []
        }
    ]
}
// 披萨（由面团、芝士、香肠、番茄生产）
const pizza: BaseProductionUnit = {
    "id": "pizza-001",
    "eosTransactionId": "tx-pizza-001",
    "tag": "PIZZA-MARGHERITA",
    "name": "玛格丽特披萨",
    "description": "经典玛格丽特披萨，配番茄酱、马苏里拉奶酪和罗勒叶。",
    "traceabilityEvents": [
        {
            "id": "event-pizza-001-produced",
            "eosTransactionId": "tx-event-pizza-001-produced",
            "type": "生产",
            "time": "2025-04-22T18:00:00+08:00",
            "location": "深圳披萨厨房",
            "operator": "厨师李师傅",
            "details": "披萨底涂抹了酱料，并添加了马苏里拉奶酪和罗勒叶。",
            "inputMaterials": [dough, cheese, tomato, pepperoni]
        },
        {
            "id": "event-pizza-001-baked",
            "eosTransactionId": "tx-event-pizza-001-baked",
            "type": "包装",
            "time": "2025-04-22T18:15:00+08:00",
            "location": "深圳披萨烤炉#1",
            "operator": "厨师李师傅",
            "details": "披萨已烘烤至金黄色。",
            "inputMaterials": []
        },
        {
            "id": "event-pizza-001-boxed",
            "eosTransactionId": "tx-event-pizza-001-boxed",
            "type": "入库",
            "time": "2025-04-22T18:20:00+08:00",
            "location": "深圳包装站",
            "operator": "刘小姐",
            "details": "披萨已放入纸盒中。",
            "inputMaterials": []
        },
        {
            "id": "event-pizza-001-delivery-started",
            "eosTransactionId": "tx-event-pizza-001-delivery",
            "type": "物流",
            "time": "2025-04-22T18:30:00+08:00",
            "location": "配送电动车#7",
            "operator": "骑手小王",
            "details": "披萨已开始配送至顾客。",
            "inputMaterials": []
        },
        {
            "id": "event-pizza-001-delivered",
            "eosTransactionId": "tx-event-pizza-001-delivered-customer",
            "type": "送达",
            "time": "2025-04-22T19:00:00+08:00",
            "location": "顾客地址",
            "operator": "李强",
            "details": "披萨已送达顾客手中。",
            "inputMaterials": []
        }
    ]
}

export {
  pizza, dough, cheese, tomato, pepperoni
}
